// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')


//初始化项目
import "./assets/css/reset.css"; //公共样式
import "./assets/js/rem.js"; //rem
import  "./assets/js/api.js" ;//api
// 引入电商插件Vant
import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)
Vue.use(VideoPlayer)

// 引入axios文件 导航守卫
import axios from 'axios'
Vue.prototype.$http=axios
//引入vuex文件
import store from './store'
// 引入全局的轮播--swiper
import '../node_modules/swiper/css/swiper.min.css'
import '../node_modules/swiper/js/swiper.min.js'
import { Lazyload } from 'vant';
//图片懒加载 
Vue.use(Lazyload);
Vue.use(Lazyload, {
  lazyComponent: true,
});

Vue.mixin({
  mounted() {
    if (this.test && typeof this.test == "function") {
      document.addEventListener("keydown", e => {
        if (e.ctrlKey && e.keyCode == 90) this.test();
      });
    }
    if (typeof this.tt != "undefined") {
      console.log(this.tt,"ttttttttttttttttttttttt");
      document.addEventListener("keydown", e => {
        if (e.ctrlKey && e.keyCode == 90) console.log(this.tt,"ttttttttttttttttttttttt");
      });
    }
  }

})
Vue.prototype.$bus = new Vue()

/* eslint-disable no-new */
new Vue({
  el: '#app',
  data:{
    num:1
  },
  router,
  components: { App },
  template: '<App/>'
})
